rewrite strip_nastyhtml, strip_html in Qt (#1341)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Mon, 23 Sep 2024 20:06:08 +0000 (14:06 -0600)
committerGitHub <noreply@github.com>
Mon, 23 Sep 2024 20:06:08 +0000 (14:06 -0600)
commitd7c2ad344287f1cf18d54d2b1f96613a220189d1
treeb45ea5483d8dea6576db246cae99df793bd8aca0
parentb3d9a51d6f2dda9d68323278238899d964b33806
rewrite strip_nastyhtml, strip_html in Qt (#1341)

* rewrite strip_html with QString.

* rewrite strip_nasty_html in Qt.

and actually produce valid html:
1. the replacement for "<body>", "<!   >", is invalid.
2. leaving an html tag in causes the html format output to be invalid.

* cleanup comment xstrdup

* use regex for strip_html

* strip_html deletes other tags

* fix strip_html img tag handling

* Revert "fix strip_html img tag handling"

This reverts commit b0440f7e3729909fd51ecbbacdd7a7e4aa5d9198.

* Revert "strip_html deletes other tags"

This reverts commit 40fe2ef0153d8c2e6d53432b9184f8acffbab2ef.

* Revert "use regex for strip_html"

This reverts commit 677da95a77b335bfa686a35fc33e862f8b50f053.

* implement strip_html using QRegularExpressionMatchIterator.

* a little cleanup

* remove obsolete include

* take care to distinguish tags with common roots

like p, param, pre.

* suppress InvalidReads in qhash.

These are known to occur per comment in qhash.cpp.

* supress qhash false positive with libqt6core6/jammy-updates,now 6.2.4+dfsg-2ubuntu1.1 amd64

* suppress vg warnings on noble (intermittant).

* install qt core dbgsyms for valgrind suppression.

* kill space preceding newline when stripping html.

* use modernize-raw-string-literal

* valgrind suppressions for f40

* add symbols for fedora valgrind suppression.
17 files changed:
exif.cc
gpsbabel.supp
reference/gc/GC7FA4.text
reference/gc/GCGCA8-encoded.txt
reference/gc/GCGCA8.txt
reference/gc/GCGCA8_nasty.gpx [new file with mode: 0644]
reference/gc/GCGCA8_nasty.html [new file with mode: 0644]
reference/gc/GCGCA8~vcard.vcf
testo
testo.d/text.test
tools/Dockerfile_f37
tools/Dockerfile_f38
tools/Dockerfile_f39
tools/Dockerfile_f40
tools/Dockerfile_jammy
tools/Dockerfile_noble
util.cc